Changeset - 0a9ddb8cd8c1
[Not reviewed]
stable
0 8 0
Mads Kiilerich (kiilerix) - 18 months ago 2023-04-13 11:54:24
mads@kiilerich.com
setup: avoid setuptools 67 - it can't handle celery's broken pytz dependency

With setuptools 67 or later, launching Kallithea fails as:

$ gearbox serve -c my.ini --reload
15:56:54,111 ERROR [gearbox] Expected closing RIGHT_PARENTHESIS
pytz (>dev)
~^

The `packaging` vendored in setuptools cannot handle the broken syntax
`Requires-Dist: pytz (>dev)` in
venv/lib/python3.11/site-packages/celery-5.0.5.dist-info/METADATA .

The old celery version currently used by Kallithea is wrong, and setuptools has
moved on after a reasonable grace period. We thus have to work around and avoid
latest setuptools.

See https://github.com/pypa/setuptools/issues/3889 .
8 files changed with 9 insertions and 9 deletions:
0 comments (0 inline, 0 general)
Jenkinsfile
Show inline comments
 
@@ -28,7 +28,7 @@ node {
 
        def virtualenvscript = """$createvirtualenv
 
            $activatevirtualenv
 
            python -m pip install --upgrade pip
 
            pip install --upgrade setuptools
 
            pip install --upgrade "setuptools<67"
 
            pip install --upgrade pylint
 
            pip install --upgrade pytest-cov
 
            """
docs/contributing.rst
Show inline comments
 
@@ -33,7 +33,7 @@ bash shell::
 
        cd kallithea
 
        python3 -m venv venv
 
        . venv/bin/activate
 
        pip install --upgrade pip setuptools
 
        pip install --upgrade pip "setuptools<67"
 
        pip install --upgrade -e . -r dev_requirements.txt python-ldap python-pam
 
        kallithea-cli config-create my.ini
 
        kallithea-cli db-create -c my.ini --user=user --email=user@example.com --password=password --repos=/tmp
docs/installation.rst
Show inline comments
 
@@ -55,7 +55,7 @@ repository, use the following commands i
 
        cd kallithea
 
        python3 -m venv venv
 
        . venv/bin/activate
 
        pip install --upgrade pip setuptools
 
        pip install --upgrade pip "setuptools<67"
 
        pip install --upgrade -e .
 
        python3 setup.py compile_catalog   # for translation of the UI
 

	
 
@@ -98,7 +98,7 @@ An additional benefit of virtualenv is t
 
  bash shell::
 

	
 
    . /srv/kallithea/venv/bin/activate
 
    pip install --upgrade pip setuptools
 
    pip install --upgrade pip "setuptools<67"
 

	
 
.. note:: You can't use UNIX ``sudo`` to source the ``activate`` script; it
 
   will "activate" a shell that terminates immediately.
docs/installation_win.rst
Show inline comments
 
@@ -104,7 +104,7 @@ In a command prompt type (adapting paths
 

	
 
  cd C:\Kallithea\Env\Scripts
 
  activate
 
  pip install --upgrade pip setuptools
 
  pip install --upgrade pip "setuptools<67"
 

	
 
The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
 
(depending of your folder structure). Then type::
docs/installation_win_old.rst
Show inline comments
 
@@ -170,7 +170,7 @@ In that CMD (loaded with VS2008 PATHs) t
 

	
 
  cd C:\Kallithea\Env\Scripts (or similar)
 
  activate
 
  pip install --upgrade pip setuptools
 
  pip install --upgrade pip "setuptools<67"
 

	
 
The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
 
(depending of your folder structure). Then type::
scripts/dbmigrate-test
Show inline comments
 
@@ -94,7 +94,7 @@ install_kallithea() {
 
    (
 
        cd "$prefix"
 
        . "$prefix-env/bin/activate"
 
        pip install --quiet --upgrade pip setuptools mercurial $EXTRA
 
        pip install --quiet --upgrade pip "setuptools<67" mercurial $EXTRA
 
        pip install --quiet -e .
 
    )
 
}
scripts/validate-commits
Show inline comments
 
@@ -42,7 +42,7 @@ for rev in $(hg log -r "$revset" -T '{no
 
    cleanup
 
    python3 -m venv "$venv"
 
    source "$venv/bin/activate"
 
    pip install --upgrade pip setuptools
 
    pip install --upgrade pip "setuptools<67"
 
    pip install -e . -r dev_requirements.txt python-ldap python-pam
 

	
 
    # run-all-cleanup
scripts/validate-minimum-dependency-versions
Show inline comments
 
@@ -30,7 +30,7 @@ sed 's/>=/==/p' dev_requirements.txt >> 
 

	
 
python3 -m venv "$venv"
 
source "$venv/bin/activate"
 
pip install --upgrade pip setuptools
 
pip install --upgrade pip "setuptools<67"
 
pip install -e . -r "$min_requirements" python-ldap python-pam 2> >(tee "$log" >&2)
 

	
 
# Treat any message on stderr as a problem, for the caller to interpret.
0 comments (0 inline, 0 general)